package com.appsl.digitalparking;

import com.appsl.animations.ActivityAnimator;
import com.appsl.manager.Redirection;
import com.appsl.objects.Lugar;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.widget.Toast;

public class FavMapActivity extends Activity {
	private String[] _animationList = {"fade", "flipHorizontal", "flipVertical", "disappearTopLeft", "appearTopLeft", "appearBottomRight", "disappearBottomRight", "unzoom"};
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_fav_map);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.fav_map, menu);
		return true;
	}

	public void goToMap(View view){
		Lugar tmp = new Lugar(0, "Jockey Plaza", "-12.084394", "-76.978436", "Av. Javier Prado 5050");
		Intent intent = new Intent(this, Map.class);
		//intent.putExtra("backAnimation", _animationList[3]);
		intent.putExtra("locName", tmp.getName());
		startActivity(intent);
		/*try
        {
                ActivityAnimator anim = new ActivityAnimator();
                anim.getClass().getMethod(_animationList[3] + "Animation", Activity.class).invoke(anim, this);
        }
        catch (Exception e) { Toast.makeText(this, "An error occured " + e.toString(), Toast.LENGTH_LONG).show(); }*/
		Redirection.goToMap(this, intent);
	}

	public void goToFavs(View view){
		Redirection.goToFavs(this);
	}
}
